#include "system_conf_cache.h"
#include <QDebug>
#include "../log/log_init.h"
SystemConfCache::SystemConfCache(QString path):path_(path)
{
    conf = new QSettings("./system.ini",QSettings::IniFormat);
    auto keys = conf->allKeys();
    for(auto it:keys){
        confMap_[it] = conf->value(it).toString();
    }
    qDebug()<<"confMap_ :"<<confMap_;
    if(!confMap_["loglevel"].isEmpty()){
        LogInit::getInstance()->setLogLevel(uint8_t(confMap_["loglevel"].toInt()));
    }

}
